﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Configuration;
using System.Text;
using System.Configuration;
using Spike.ServiceFramework.ServiceModel.Registration;

namespace Spike.ServiceFramework.ServiceModel
{
    public class ServiceBehaviorExtension : FrameworkBehaviorExtensionElement
    {
        public override Type BehaviorType
        {
            get { return typeof(DispatchMessageInspector); }
        }

        protected override object CreateBehavior()
        {
            return new DispatchMessageInspector(this);
        }

        [ConfigurationProperty("registration", DefaultValue = null, IsRequired = false)]
        public ServiceRegistrationBehavior Registration
        {
            get { return (ServiceRegistrationBehavior)base["registration"]; }
            set { base["registration"] = value; }
        }
    }
}
